package com.wyman.user_center_back.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.sql.Timestamp;

/**
 * @author Wyman
 * @date 2024/8/31
 */

@Data
@TableName("user")
public class User {

    //标识主键并且自增
    @TableId(type = IdType.AUTO)
    private long id;
    private String userAccount;
    private String username;
    private String userPassword;
    private Timestamp createtime;
    private Timestamp updatetime;
    private String avatarUrl;
    private int userRole;
    //标识逻辑删除
    @TableLogic
    private int isdelete;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userAccount='" + userAccount + '\'' +
                ", username='" + username + '\'' +
                ", userPassword='" + userPassword + '\'' +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", isdelete=" + isdelete +
                '}';
    }
}
